package com.chuang.server.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chuang.server.pojo.TreeCategory;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 树形分类表
 Mapper 接口
 * </p>
 *
 * @author vicente
 * @since 2021-12-18
 */
@Mapper
public interface TreeCategoryMapper extends BaseMapper<TreeCategory> {
    @MapKey("id")
    List<Map> list();
    @MapKey("id")
    List<Map> byUserList(@Param("id") Long id);

    int addCategory(@Param("category") JSONObject category);

    int delCategory(@Param("category") List category);

    int updateCategory(@Param("category") JSONObject category);
}
